<template>
  <div>
    <div class="menu">
      <!-- 定义导航菜单使用router-link，属性to是跳转的路由 -->
      <router-link to="/home">首页</router-link>
      <router-link to="/cart">购物车</router-link>
      <router-link to="/order">订单</router-link>
      <router-link to="/my">我的</router-link>
    </div>
    <hr>
    <!-- router-view相当于slot，找到匹配的路由的component进行替换router-view -->
    <router-view></router-view>
  </div>
</template>

<script>
export default {
}
</script>

<style>
.menu {
  width: 400px;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
}
</style>
